@extends('layouts.default')  
@section('content')
<div class="box primary">        
    <header>
        <div class="icons">
            <a href="{{ URL::to('insur_docs/create')}}"><i class="fa fa-plus" style="color:white;"></i></a>
        </div>
        <h5>{{Lang::get('messages.insur_docs')}}</h5>
        <!-- .toolbar -->
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div><!-- /.toolbar -->
    </header>
    <div id="div-1" class="body">   
        @foreach ($values as $v)     
        {{ Form::model($v, array('route' => array('insur_docs.update', $v->id),
                        'method' => 'PUT','class'=>'form-horizontal','id'=>'form-validate')) }}
        <div class="form-group">
            {{ Form::label('owner', Lang::get('messages.owner').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('owner',isset($v->owner) ? $v->owner : '',  array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.owner')))
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('ownership_cert', Lang::get('messages.ownership_cert').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::Radio('ownership_cert', '1', ($v->ownership_cert == '1') ? true : false) }}
                {{Lang::get('messages.yes')}}
                {{ Form::Radio('ownership_cert', '0', ($v->ownership_cert == '0') ? true : false) }}
                {{Lang::get('messages.no')}}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('authoriz', Lang::get('messages.authorization').'*', array(
                            'class'=>'control-label col-lg-4')) }}            
            <div class="col-lg-8">
                {{ Helpers\Helper::date('authoriz', isset($v->authoriz) ? $v->authoriz : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drive_permis', Lang::get('messages.driving_license').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::select('drive_permis', array(
                                '' => '', 
                                '1' => Lang::get('messages.active'), 
                                '0' => Lang::get('messages.not_active')),
                        isset($v->drive_permis) ? $v->drive_permis : '',  array(
                                'class' => 'form-control'))
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('sgs', Lang::get('messages.sgs').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('sgs', isset($v->sgs) ? $v->sgs : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>  
        <div class="form-group">
            {{ Form::label('sgs_cost', Lang::get('messages.sgs_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('sgs_cost',  isset($v->sgs_cost) ? $v->sgs_cost : '' , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.sgs_cost'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('sgs_tax', Lang::get('messages.sgs_tax').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('sgs_tax',  isset($v->sgs_tax) ? $v->sgs_tax : ''  , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.sgs_tax'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('tpl', Lang::get('messages.tpl').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('tpl', isset($v->tpl) ? $v->tpl : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('tpl_cost', Lang::get('messages.tpl_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('tpl_cost',  isset($v->tpl_cost) ? $v->tpl_cost : '' , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.tpl_cost'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('kasko', Lang::get('messages.kasko').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('kasko', isset($v->kasko) ? $v->kasko : '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('kasko_cost', Lang::get('messages.kasko_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('kasko_cost',   isset($v->kasko_cost) ? $v->kasko_cost : '' , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.kasko_cost'))) 
                }}

            </div>
        </div>
        <div class="form-group">
            {{ Form::label('inter_permis', Lang::get('messages.inter_permission'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('inter_permis', isset($v->inter_permis) ? $v->inter_permis : '' , array(
                                'class' => 'form-control')) 
                }}<br/>                    
                <div id="validation-div" class="">

                </div>
            </div>
        </div>
        {{ Form::submit(lang::get('messages.save_btn'), array('class' => 'btn btn-primary btn-line')) }}
        <input type="button" value="{{Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" onClick="history.go(-1);
                return true;">
        {{ Form::close() }}          
        @endforeach
    </div>
</div>   
@stop
